<%--                                                                       --%>
<%-- Copyright (c) 2004-2005 BroadVision, Inc.  All rights reserved.       --%>
<%--                                                                       --%>
<%-- This software is copyrighted. Under the copyright laws, this software --%>
<%-- may not be copied, in whole or in part, without prior written consent --%>
<%-- of BroadVision, Inc. or its assignees. This software is provided      --%>
<%-- under the terms of a license between BroadVision and the recipient,   --%>
<%-- and its use is subject to the terms of that license.                  --%>
<%--                                                                       --%>
<%-- This software may be protected by one or more U.S. and International  --%>
<%-- patents.  Certain applications of BroadVision One-To-One software are --%>
<%-- covered by U.S. patent 5,710,887.                                     --%>
<%--                                                                       --%>
<%-- TRADEMARKS: BroadVision and BroadVision One-To-One are registered     --%>
<%-- trademarks of BroadVision, Inc., in the United States and the         --%>
<%-- European Community, and are trademarks of BroadVision, Inc., in other --%>
<%-- countries.  The BroadVision logo, is a trademark of BroadVision,      --%>
<%-- Inc., in the United States and other countries. Additionally, IONA    --%>
<%-- and Orbix are trademarks of IONA Technologies, Ltd.  RSA, MD5, and    --%>
<%-- RC2 are trademarks of RSA Data Security, Inc.                         --%>
<%--                                                                       --%>

<%@ taglib uri="/WEB-INF/c.tld" prefix="c" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-html-el.tld" prefix="html-el" %>
<%@ taglib uri="/WEB-INF/struts-bean-el.tld" prefix="bean-el" %>

<script language="JavaScript">

//
//
//
function doPortletEntityEdit(form) {
  <c:url var="editUrl" value="/ep/portletEntityEdit.do">
    <c:param name="programId" value="${epPortletEntityForm.map.id}"/>
  </c:url>

  form.action = '<c:out value="${editUrl}"/>';
  form.submit();
}

//
//
//
function doPortletEntityDelete(form) {
  if (!confirm("<bean:message key="ep.portlet.alert.confirmDeletePortletEntity" bundle="ep.messages"/>")) return;
    var action = '<c:url value="/ep/portletEntityDelete.do"/>';
    if (action.indexOf("?") == -1) {
      action += "?";
    }
    action += "programId=" + <c:out value="${epPortletEntityForm.map.id}"/>;
    action += "&portletId=" + '<c:out value="${epPortletEntityForm.map.portletName}"/>';
    action += "&portletAppId=" + '<c:out value="${epPortletEntityForm.map.portletAppId}"/>';
    action += "&serverId=" + <c:out value="${epPortletEntityForm.map.serverId}"/>;
    
  form.action = action;
  form.submit();
}

//
//
//
function doDone() {
  <c:url var="doneUrl" value="${epActionForward.map.forward}"/>

  window.location = '<c:out value="${doneUrl}"/>';
}

</script>

<table class="zoneFive" width="100%" border="0" cellspacing="0" cellpadding="0" summary="content area">
  <tr>
    <td valign="top" width="100%">
      <div class="pageTitle">
        <bean-el:message key="ep.portlet.entity.view.page.title" bundle="ep.messages" arg0="${epPortletEntityForm.map.name}"/>
      </div>
      <div class="errorMessage"><html-el:errors bundle="ep.messages"/></div>
      <%@ include file="/mc/common/pagetab.jsp" %>

      <!- place body here -->

      <form name="epPortletEntityView" method="post">

      <input type="hidden" name="forward" value="<c:out value="${epActionForward.map.forward}"/>"/>

      <div class="pageSubtitle">
        <span class="left"><bean:message key="ep.portlet.entity.information" bundle="ep.messages"/></span>
        <span class="right">
          <input type="button" class="inputButton" value='<bean:message key="button.edit" bundle="ep.messages"/>'
            onclick="doPortletEntityEdit(this.form);">
          <input type="button" class="inputButton" value='<bean:message key="button.delete" bundle="ep.messages"/>'
            onclick="doPortletEntityDelete(this.form);">
        </span>
      </div>

      <table class="labelForm" width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td class="label" width="30%"><bean:message key="ep.portlet.entity.name" bundle="ep.messages"/>:</td>
        <td class="labelField" width="70%"><c:out value="${epPortletEntityForm.map.name}"/>
        </td>
      </tr>

      <tr>
        <td class="label" width="30%"><bean:message key="ep.portlet.entity.category" bundle="ep.messages"/>:</td>
        <td class="labelField" width="70%"><c:out value="${epPortletEntityForm.map.categoryPath}"/>
        </td>
      </tr>

      <tr>
        <td class="label" width="30%"><bean:message key="ep.portlet.name" bundle="ep.messages"/>:</td>
        <td class="labelField" width="70%"><c:out value="${epPortletEntityForm.map.portletName}"/>
        </td>
      </tr>

      <tr>
        <td class="label" width="30%"><bean:message key="ep.description" bundle="ep.messages"/>:</td>
        <td class="labelField" width="70%"><c:out value="${epPortletEntityForm.map.description}"/>
        </td>
      </tr>

      <tr>
        <td class="label" width="30%"><bean:message key="ep.status" bundle="ep.messages"/>:</td>
        <td class="labelField" width="70%">
            <c:choose>
              <c:when test="${epPortletEntityForm.map.status == 0}">
              <bean:message key="ep.label.offline" bundle="ep.messages"/>
              </c:when>
	      <c:otherwise>
	      <bean:message key="ep.label.online" bundle="ep.messages"/>
	      </c:otherwise>
            </c:choose>
        </td>
      </tr>

      <tr>
        <td class="label" width="30%"><bean:message key="ep.page.type.name" bundle="ep.messages"/>:</td>
        <td class="labelField" width="70%"><c:out value="${epPortletEntityForm.map.pageTypeName}"/>
        </td>
      </tr>

      </table>

      </form>

    </td>
  </tr>
</table>
